<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2016/11/3
  Time: 23:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/mb/jsp/common.jsp" %>
<%@ page import="com.limao.servlet.WebFunction" %>
<%@ page import="com.limao.DBDataClass.CrowdUserAuthClass" %>
<%@ page language="java" import="com.limao.DBDataClass.CrowdMAHomeClass"%>
<%@ page import="com.limao.Tool.Arith" %>

<%
    String userid=CacheClass.isLogin(request,response);
    if (CacheClass.getIntValue(userid) == 0) {
        out.println("<script language='JavaScript'>alert('您还没有登陆！');location.href=document.referrer;</script>"); //后退并刷新
        return;
    }
    CrowdUserAuthClass user = WebFunction.getUserInfo(request, response);
    if (user == null) {
        out.println("<script language='JavaScript'>alert('用户不存在，或被平台禁用，请联系客服！');window.history.back(-1);</script>");
        return;
    }

    String rank = "未知";
    if (!TextUtils.isEmpty(user.rank)) {
        rank = user.rank;
    }


%>


<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>个人</title>
      
</head>
<body ontouchstart="">
<div class="detailTop pf w100 of">
    <div class="w100 of tc cf  flexBox">
     	<a href="mb/jsp/activities.jsp" class="db f14 tl pr" style="margin-left: 4%;width:19%;">
     		活动公告<span class="pa orangeDot" style="top: 13px;right: -1px;"></span>
        </a>
      	<p class="f18 tc" style="width:54%;">我的</p>
       <a href="mb/jsp/withdraw.jsp" class="db of f14 tr" style="margin-right: 4%;width:19%;">
           		提现
        </a>
    </div>
</div>
<div class="container jz mgt45">
    <section class="personalAllInfo w100 bcf of withdrawBack" style="height:121px;">
        <a href="mb/jsp/personalData.jsp" class="db clearfix of">
            <img src="<%=getImageBasePath(user.avatar)%>" class="db fl" id="userimg">
            <div class="fl lh15 mgt10" style="margin-left:5%;">
                <p class='cf f16'><%=user.username%></p>
                <div class="df">
                	<%if (user.viplevel != null && !user.viplevel.equals("0")){%>
	                	<div class="pr">
	                		 <img src="mb/images/vipShow.png" class="db" style="height: 20px;margin-top: 3px;">
	                		 <span class="f13 cf pa" style="right: 6px;top: 1px;"><%=user.viplevel%></span>
	                	</div>
                	<%}%>
                	<%if (user.vipdateStr != null){%>
	                	<p class='cf f14'><%=user.vipdateStr%></p>
                	<%}%>
                	
                </div>
                
                <p class='cf f12'>经销商  可提活跃值与回购速度</p>
            </div>
            <span class="fr db">
                    <img src="mb/images/my-setting.png" class="db">
            </span>
        </a>

    </section>

<section class="personalAllMoney w100 jz bcf of">
        <div class="personalAllMoneyContent of">
            <div class="of clearfix">
                <div class="fl pr">
                    <a  href="mb/jsp/record.jsp?recordKind=caidan" class="db">
	                    <div class="of" style="margin-left: 12px;">
	                        <div class="of">
	                           <p class="f14 c9 fl">商场余额</p>
	                           <p class='blueLable fl'>记录</p>
	                        </div>
	                        <p class="f15 c3 mgt6"><%=user.rmbforwith%></p>
	                    </div>
                    </a>

                </div>
                <div class="fr">
                   <a href="mb/jsp/record.jsp?recordKind=zongedu" class="db">
	                        <div class="of" style="margin-left: 15px;">
		                        <div class="of">
		                           <p class="f14 c9 fl">现货手数</p>
		                           <p class='blueLable fl'>记录</p>
		                        </div>
		                        <p class="f15 c3 mgt6"><%=user.principlelrmb%></p>
	                    	</div>
                        </a>
                </div>
            </div>

        </div>
    </section>


     <section class="personalAllMoney w100 jz bcf of">
            <div class="personalAllMoneyContent of">
                <div class="of clearfix">
                    <div class="fl pr">
                        <a href="mb/jsp/record.jsp?recordKind=shengwangzhi" class="db">
	                        <div class="of" style="margin-left: 12px;">
		                        <div class="of">
		                           <p class="f14 c9 fl">活跃值</p>
		                           <p class='blueLable fl'>记录</p>
		                        </div>
		                        <p class="f15 c3 mgt6"><%=user.prestigevalue%></p>
	                    	</div>
                        </a>
                        
                    </div>
                    <div class="fr">
                        <a href="mb/jsp/rankingList.jsp" class="db">
	                        <div class="of" style="margin-left: 15px;">
		                        <div class="of">
		                           <p class="f14 c9 fl">我的排名</p>
		                           <p class='blueLable fl'>排行榜</p>
		                        </div>
		                        <p class="f15 c3 mgt6"><%=user.rank%></p>
	                    	</div>
                        </a>
                        
                    </div>
                </div>
            </div>
    </section>

    <section class="personalAllMoney w100 jz bcf of">
        <div class="of">
            <div class="of clearfix personalBottomNav b-b">

                 <a href="mb/jsp/shoppingCar.jsp" class='fl'>
                  <img src="mb/images/gwc.png" class='db jz'>
                  <p class='f12 c3 tc'>购物车</p>
                </a>
                <a href="mb/jsp/myOrder.jsp" class='fl'>
                  <img src="mb/images/scdd.png" class='db jz'>
                  <p class='f12 c3 tc w100'>商城订单</p>
                </a>
               <a href="javascript:showToast('网页端不支持该功能，请用户下载七彩云购的官方APP');" class='fl'>
                  <img src="mb/images/bx.png" class='db jz'>
                  <p class='f12 c3 tc'>宝箱</p>
                </a>
                  <a href="javascript:showToast('网页端不支持该功能，请用户下载七彩云购的官方APP');" class='fl'>
                  <img src="mb/images/jpdd.png" class='db jz'>
                  <p class='f12 c3 tc'>奖品订单</p>
                </a>
                
               
            </div>
             <div class="of clearfix personalBottomNav">
               <a href="mb/jsp/shengWangShangCheng.jsp" class='fl'>
                  <img src="mb/images/swlp.png" class='db jz'>
                  <p class='f12 c3 tc'>活跃礼品</p>
                </a>
                <a href="mb/jsp/shengWangOrder.jsp" class='fl'>
                  <img src="mb/images/swdd.png" class='db jz'>
                  <p class='f12 c3 tc'>活跃礼单</p>
                </a>
               
                 <a href="mb/jsp/beginnerSchool.jsp"  class='fl'>
                  <img src="mb/images/xsxt.png" class='db jz'>
                  <p class='f12 c3 tc'>新手学堂</p>
                </a>
                 <a href="mb/jsp/aboutUs.jsp" class='fl'>
                  <img src="mb/images/gywm.png" class='db jz'>
                  <p class='f12 c3 tc'>关于我们</p>
                </a>
            </div>
        </div>
        
    </section>
    <section class="w100 of mgb32">
     	<!-- <button type="button" class="btnOrange w92 jz db f18 cf tc lh2 mgt10" onclick="loginOut();">办事处管理</button> -->
        <button type="button" class="btnBlue w92 jz db f18 cf tc lh2 mgt10" onclick="loginOut();">退出登陆</button>
    </section>
    <script>
    	$(window).on("load", function() {
				$("#footer").load("mb/footer.jsp", function() {
				  footerTab(5);
				});
	    })
    

        window.addEventListener('pageshow', function (event) {
            // 获取localStore中的变量
            var needrefresh = localStorage.getItem("needrefreshpersonalall");//存储变量名为key，值为value的变量
            if (needrefresh != '' && needrefresh != null && needrefresh == 'true') {
                localStorage.removeItem("needrefreshpersonalall");
                window.location.reload();
            }
        });

        // 退出登录
        function loginOut() {

            $.ajax({
                url: "PlugServlet",
                data: JSON.stringify({m: 61, platform: "0"}),
                type: 'post',
                dataType: 'json',
                contentType: "application/json;charset=utf-8",
                beforeSend: function () {
                    showProgressDg();
                },
                success: function (data) {
                    if (data.state == 1) {
                        window.location.href = 'mb/jsp/login.jsp';
                    } else {
                        // 其他错误弹出提示
                        showToast(data.info);
                    }
                },
                error: function (data) {
                    showToast(data.info);
                },
                complete: function () {
                    closeProgressDg();
                }
            });
        }

    </script>

</div><!--container-->
<!--footer-->
<footer id="footer" class="footerTab w100 of pf"> </footer>
</body>
</html>
